new Vue({
    el: '#app',
    data: {
        infoId: '',
        msg: '',
        member: {},
        formData: {},
        SERVER_HOST: SERVER_HOST
    },
    mounted() {
        var member = Cookies.get('member');
        if (!member || member == null || member == '') {
            window.location.href = 'dl.html';
        } else {
            this.member = JSON.parse(member);
        }
        this.infoId = getUrlKey('id');
        this.load();
    },
    methods: {
        exit () {
            Cookies.remove('member');
            window.location.href = 'dl.html';
        },
        load () {
            if (this.infoId) {
                getAjax().post('/web/infoDetail', toFormData({infoId: this.infoId})).then(res => {
                    this.formData = res.data.data;
                });
            }
        },
        back (href) {
            window.location.href = href;
        }
    }
});
